<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>date</title>
	</head>
	<body>
		<div id="div1"></div>
		<script>
			var count1 = setInterval(fun11,1000);
			function fun11(){
				var date1 = new Date();
				function getCurrentWeekday() {
				  const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
				  //const today = new Date();
				  const weekday = date1.getDay();
				  return weekdays[weekday];
				}
				function getHour(){
					var hour = date1.getHours();
					if(hour>5&&hour<12){
						return "上午好";
					}else if(hour>12&&hour<18){
						return "下午好";
					}else{
						return "晚上好";
					}
				} 
				var hour = date1.getHours();
				var minutes = date1.getMinutes();
				var seconds = date1.getSeconds();
				var week = getCurrentWeekday();
				// var div1 = document.getElementById("div1");
				div1.innerHTML = "今天是："+week+" "+hour+"时"+minutes+"分"+seconds+"秒"+getHour();
			}
			
			
		</script>
	</body>
</html>